package net.starwifi.duobao.dto;


import com.fasterxml.jackson.annotation.JsonProperty;
import net.starwifi.duobao.entity.BaseEntity;
import net.starwifi.duobao.entity.Member;


/**
 * Created by Administrator on 2015/10/30.
 */
public class OMember extends BaseEntity {


    /** 性别(0男，1女) */
    private int gender;

    /** 用户名 */
    private String username;

    /** E-mail */
    private String email;

    /* 用户logo */
    private String logo;

    /** 昵称 */
    private String nickname;

    public static OMember get(Member member){
        OMember entity=new OMember();
        entity.setNickname(member.getNickname());
        entity.setGender(member.getGender());
        entity.setUsername(member.getUsername());
        entity.setEmail(member.getEmail());
        entity.setLogo(member.getLogo());
        entity.setId(member.getId());
        return entity;
    }

    @JsonProperty
    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    @JsonProperty
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @JsonProperty
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @JsonProperty
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @JsonProperty
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
}
